using System.Linq;
using System.Text;
using System.Diagnostics;
using System.Runtime.Serialization;
using System.Collections;
using System.Data;
using System.ComponentModel;
using System.Data.OracleClient;
using WPFExcelReport.Helpers;
using WPFExcelReport.Controls;
namespace WPFExcelReport
{
    public partial class VKDPARAM
    {
        public DataRow Convert2KDPARAM(DataRow dwInput, string ITXDBVERSION, bool IsConvert = false)
        {
            DataSet SResult = new DataSet();
            SResult = QueryKDPARAM(dwInput, 0);
            DataRow dwReturn = null;
            if (SResult.Tables[0].Rows.Count > 0)
            {
                dwReturn = SResult.Tables[0].Rows[0];
            }
            else
            {
                dwReturn = SResult.Tables[0].NewRow();
            }
            switch (ITXDBVERSION)
            {
                case "YGR":
                    #region=========
         dwReturn["KDRMANDANT"] = " ".PadRight(2 ); 
         dwReturn["KDRKUNDNR"] = " ".PadRight(8 ); 
         dwReturn["KDRADRSL"] = " ".PadRight(8 ); 
         dwReturn["KDRBESTA"] = " ".PadRight(1 ); 
         dwReturn["KDRBESL"] = " ".PadRight(8 ); 
         dwReturn["KDRLFSTA"] = " ".PadRight(1 ); 
         dwReturn["KDRLFSL"] = " ".PadRight(8 ); 
         dwReturn["KDRLFWE"] = " ".PadRight(1 ); 
         dwReturn["KDRRESTA"] = " ".PadRight(1 ); 
         dwReturn["KDRRESL"] = " ".PadRight(8 ); 
         dwReturn["KDRLIEFS"] = " ".PadRight(1 ); 
         dwReturn["KDRSTYP1"] = " ".PadRight(3 ); 
         dwReturn["KDRSADR1"] = " ".PadRight(20 ); 
         dwReturn["KDRSKONV1"] = " ".PadRight(4 ); 
         dwReturn["KDRSPFAD1"] = " ".PadRight(40 ); 
         dwReturn["KDRSSOFORT1"] = " ".PadRight(1 ); 
         dwReturn["KDRPARAM1"] = " ".PadRight(5 ); 
         dwReturn["KDRSTYP2"] = " ".PadRight(3 ); 
         dwReturn["KDRSADR2"] = " ".PadRight(20 ); 
         dwReturn["KDRSKONV2"] = " ".PadRight(4 ); 
         dwReturn["KDRSPFAD2"] = " ".PadRight(40 ); 
         dwReturn["KDRSSOFORT2"] = " ".PadRight(1 ); 
         dwReturn["KDRPARAM2"] = " ".PadRight(5 ); 
         dwReturn["KDRSTYP3"] = " ".PadRight(3 ); 
         dwReturn["KDRSADR3"] = " ".PadRight(20 ); 
         dwReturn["KDRSKONV3"] = " ".PadRight(4 ); 
         dwReturn["KDRSPFAD3"] = " ".PadRight(40 ); 
         dwReturn["KDRSSOFORT3"] = " ".PadRight(1 ); 
         dwReturn["KDRPARAM3"] = " ".PadRight(5 ); 
         dwReturn["KDRSTYP4"] = " ".PadRight(3 ); 
         dwReturn["KDRSADR4"] = " ".PadRight(20 ); 
         dwReturn["KDRSKONV4"] = " ".PadRight(4 ); 
         dwReturn["KDRSPFAD4"] = " ".PadRight(40 ); 
         dwReturn["KDRSSOFORT4"] = " ".PadRight(1 ); 
         dwReturn["KDRPARAM4"] = " ".PadRight(5 ); 
         dwReturn["KDRSTYP5"] = " ".PadRight(3 ); 
         dwReturn["KDRSADR5"] = " ".PadRight(20 ); 
         dwReturn["KDRSKONV5"] = " ".PadRight(4 ); 
         dwReturn["KDRSPFAD5"] = " ".PadRight(40 ); 
         dwReturn["KDRSSOFORT5"] = " ".PadRight(1 ); 
         dwReturn["KDRPARAM5"] = " ".PadRight(5 ); 
         dwReturn["KDRSTYP6"] = " ".PadRight(3 ); 
         dwReturn["KDRSADR6"] = " ".PadRight(20 ); 
         dwReturn["KDRSKONV6"] = " ".PadRight(4 ); 
         dwReturn["KDRSPFAD6"] = " ".PadRight(40 ); 
         dwReturn["KDRSSOFORT6"] = " ".PadRight(1 ); 
         dwReturn["KDRPARAM6"] = " ".PadRight(5 ); 
         dwReturn["KDRSTYP7"] = " ".PadRight(3 ); 
         dwReturn["KDRSADR7"] = " ".PadRight(20 ); 
         dwReturn["KDRSKONV7"] = " ".PadRight(4 ); 
         dwReturn["KDRSPFAD7"] = " ".PadRight(40 ); 
         dwReturn["KDRSSOFORT7"] = " ".PadRight(1 ); 
         dwReturn["KDRPARAM7"] = " ".PadRight(5 ); 
         dwReturn["KDRSTYP8"] = " ".PadRight(3 ); 
         dwReturn["KDRSADR8"] = " ".PadRight(20 ); 
         dwReturn["KDRSKONV8"] = " ".PadRight(4 ); 
         dwReturn["KDRSPFAD8"] = " ".PadRight(40 ); 
         dwReturn["KDRSSOFORT8"] = " ".PadRight(1 ); 
         dwReturn["KDRPARAM8"] = " ".PadRight(5 ); 
         dwReturn["KDRFSETIZL"] = " ".PadRight(2 ); 
         dwReturn["KDRLSTYP"] = " ".PadRight(1 ); 
         dwReturn["KDRANRNEU"] = " ".PadRight(1 ); 
         dwReturn["KDRFMABR"] = " ".PadRight(2 ); 
         dwReturn["KDRMINAUFTR"] = " ".PadRight(0 ); 
         dwReturn["KDRMINFM"] = " ".PadRight(0 ); 
         dwReturn["KDRAUFBER"] = " ".PadRight(2 ); 
         dwReturn["KDRSORT"] = " ".PadRight(1 ); 
         dwReturn["KDROSW"] = " ".PadRight(1 ); 
         dwReturn["KDRZR"] = " ".PadRight(1 ); 
         dwReturn["KDRLFMABR"] = " ".PadRight(0 ); 
         dwReturn["KDRZEUGNIS"] = " ".PadRight(1 ); 
         dwReturn["KDRFILLER"] = " ".PadRight(23 ); 
         dwReturn["KDRAENZL"] = " ".PadRight(0 ); 
         dwReturn["KDRAENB"] = " ".PadRight(8 ); 
         dwReturn["KDRAEND"] = " ".PadRight(0 ); 
         dwReturn["KDRNEUB"] = " ".PadRight(8 ); 
         dwReturn["KDRNEUD"] = " ".PadRight(0 ); 
                    #endregion
                    break;
                case "JLT":

                    break;
                default:

                    break;
            }
            if (IsConvert)
            {
                foreach (DataColumn cm in dwInput.Table.Columns)
                {
                    if (dwInput[cm.ColumnName].ToString() == "")
                        continue;
                    if (dwReturn.Table.Columns.Contains(cm.ColumnName))
                    {
                        dwReturn[cm.ColumnName] = dwInput[cm.ColumnName];
                    }
                }
            }
            return dwReturn;
        }
        public void MapKDPARAM(ref DataRow dwLocal, DataRow dwData)
        {
            BlindMap(ref dwLocal, dwData);
        }
        public void SaveKDPARAM(DataRow dwData, string ITXDBVERSION = "50.24")
        {
            DataSet setResult = new DataSet();
            DataTable tbLocal = null;
            DataRow dwLocal = null;
            bool flgExist = false;
            setResult = QueryKDPARAM(dwData);
            if (setResult.Tables.Count > 0)
            {
                tbLocal = setResult.Tables[0];
                if (tbLocal.Rows.Count > 0)
                {
                    flgExist = true;
                    dwLocal = tbLocal.Rows[0];
                }
                else
                {
                    dwLocal = tbLocal.NewRow();
                }
            }
            MapKDPARAM(ref dwLocal, dwData);

            if (!flgExist)
            {

                InsertKDPARAM(dwLocal, ITXDBVERSION);
            }
            UpdateKDPARAM(dwLocal);
        }
        public void InsertKDPARAM(DataRow dwData, string ITXDBVERSION = "50.24")
        {
            OracleCommand or1;
            or1 = OracleDB.CreateCommand();
            switch (ITXDBVERSION)
            {
                case "YGR":
                    or1.CommandText = "INSERT INTO KDPARAM(VAKBMANDANT, VAKBKOLL, VAKBART, VAKBKUNDNR, VAKBFARBE, VAKBKDARTNR, VAKBKDARTBEZ, VAKBKDFARBNR, VAKBANDRUCK, VAKBMEGEW, VAKBMENGEH, VAKBGEWVON, VAKBGEWBIS, VAKBGEWCA, VAKBGEWFKT, VAKBGEWGRP, VAKBMEGFKT, VAKBMEGGRP, VAKBAENDZL, VAKBAENDBEN, VAKBAENDDAT, VAKBNEUBEN, VAKBNEUDAT, VAKBFILLER)"
                        + " VALUES (:VAKBMANDANT, :VAKBKOLL, :VAKBART, :VAKBKUNDNR, :VAKBFARBE, '                         ', '                         ', '                             ', ' ', '   ', '   ', 0, 0, ' ', '000000000000', ' ', '000000000000', ' ', 0, '        ', '000000', '        ', '      ', '                                          ')";
                    or1.Parameters.Add("VAKBMANDANT", OracleType.NVarChar).Value = dwData["VAKBMANDANT"].ToString();
                    or1.Parameters.Add("VAKBKOLL", OracleType.NVarChar).Value = dwData["VAKBKOLL"].ToString();
                    or1.Parameters.Add("VAKBART", OracleType.NVarChar).Value = dwData["VAKBART"].ToString();
                    or1.Parameters.Add("VAKBFARBE", OracleType.NVarChar).Value = dwData["VAKBFARBE"].ToString();
                    or1.Parameters.Add("VAKBKUNDNR", OracleType.NVarChar).Value = dwData["VAKBKUNDNR"].ToString();
                    break;
                //VAFMANDANT VAFKOLL VAFART VAFFARBE VAFBEZ VAFFFARBE

            }
            
            Connect2Proxy(or1);
        }
        public DataSet QueryKDPARAM(DataRow dwData, int option = 1)
        {
            DataSet Return;
            DataSet Result = new DataSet();
            OracleCommand or1 = OracleDB.CreateCommand();
            switch (option)
            {
                case 0:
                    or1.CommandText = "SELECT * FROM KDPARAM WHERE  ROWNUM<2 ";
                    break;
              
                case 99:
                    or1.CommandText = "SELECT * FROM KDPARAM  WHERE ROWNUM<50";
                    break;
                default:
                    break;
            }
            Result = Connect2Proxy(or1);
            if (Result.Tables.Count > 0)
                Result.Tables[0].TableName = "KDPARAM";
            Return = Result;
            return Return;
        }
        public void DeleteKDPARAM(DataRow dwData, int option = 1)
        {

            OracleCommand or1 = OracleDB.CreateCommand();
            switch (option)
            {
                case 1:
                    or1.CommandText = "DELETE FROM KDPARAM   WHERE  VAKBMANDANT=:VAKBMANDANT AND VAKBKOLL=:VAKBKOLL AND VAKBART =:VAKBART AND VAKBFARBE=:VAKBFARBE AND VAKBKUNDNR=:VAKBKUNDNR";
                     or1.Parameters.Add("VAKBMANDANT", OracleType.NVarChar).Value = dwData["VAKBMANDANT"].ToString();
                    or1.Parameters.Add("VAKBKOLL", OracleType.NVarChar).Value = dwData["VAKBKOLL"].ToString();
                    or1.Parameters.Add("VAKBART", OracleType.NVarChar).Value = dwData["VAKBART"].ToString();
                    or1.Parameters.Add("VAKBFARBE", OracleType.NVarChar).Value = dwData["VAKBFARBE"].ToString();
                    or1.Parameters.Add("VAKBKUNDNR", OracleType.NVarChar).Value = dwData["VAKBKUNDNR"].ToString();
                    break;
                default:
                    break;
            }
            Connect2Proxy(or1);
        } 
      
        public void UpdateKDPARAM(DataRow dwData, string ITXDBVERSION = "50.24", int option = 1)
        {
            OracleCommand or1;
            DataSet Result = new DataSet();
            or1 = OracleDB.CreateCommand();
            switch (option)
            {
                case 1:
                    #region====Command==== 
                    or1.CommandText = "UPDATE KDPARAM SET "
                    +"KDRMANDANT= :KDRMANDANT,"
                    +"KDRKUNDNR= :KDRKUNDNR,"
                    +"KDRADRSL= :KDRADRSL,"
                    +"KDRBESTA= :KDRBESTA,"
                    +"KDRBESL= :KDRBESL,"
                    +"KDRLFSTA= :KDRLFSTA,"
                    +"KDRLFSL= :KDRLFSL,"
                    +"KDRLFWE= :KDRLFWE,"
                    +"KDRRESTA= :KDRRESTA,"
                    +"KDRRESL= :KDRRESL,"
                    +"KDRLIEFS= :KDRLIEFS,"
                    +"KDRSTYP1= :KDRSTYP1,"
                    +"KDRSADR1= :KDRSADR1,"
                    +"KDRSKONV1= :KDRSKONV1,"
                    +"KDRSPFAD1= :KDRSPFAD1,"
                    +"KDRSSOFORT1= :KDRSSOFORT1,"
                    +"KDRPARAM1= :KDRPARAM1,"
                    +"KDRSTYP2= :KDRSTYP2,"
                    +"KDRSADR2= :KDRSADR2,"
                    +"KDRSKONV2= :KDRSKONV2,"
                    +"KDRSPFAD2= :KDRSPFAD2,"
                    +"KDRSSOFORT2= :KDRSSOFORT2,"
                    +"KDRPARAM2= :KDRPARAM2,"
                    +"KDRSTYP3= :KDRSTYP3,"
                    +"KDRSADR3= :KDRSADR3,"
                    +"KDRSKONV3= :KDRSKONV3,"
                    +"KDRSPFAD3= :KDRSPFAD3,"
                    +"KDRSSOFORT3= :KDRSSOFORT3,"
                    +"KDRPARAM3= :KDRPARAM3,"
                    +"KDRSTYP4= :KDRSTYP4,"
                    +"KDRSADR4= :KDRSADR4,"
                    +"KDRSKONV4= :KDRSKONV4,"
                    +"KDRSPFAD4= :KDRSPFAD4,"
                    +"KDRSSOFORT4= :KDRSSOFORT4,"
                    +"KDRPARAM4= :KDRPARAM4,"
                    +"KDRSTYP5= :KDRSTYP5,"
                    +"KDRSADR5= :KDRSADR5,"
                    +"KDRSKONV5= :KDRSKONV5,"
                    +"KDRSPFAD5= :KDRSPFAD5,"
                    +"KDRSSOFORT5= :KDRSSOFORT5,"
                    +"KDRPARAM5= :KDRPARAM5,"
                    +"KDRSTYP6= :KDRSTYP6,"
                    +"KDRSADR6= :KDRSADR6,"
                    +"KDRSKONV6= :KDRSKONV6,"
                    +"KDRSPFAD6= :KDRSPFAD6,"
                    +"KDRSSOFORT6= :KDRSSOFORT6,"
                    +"KDRPARAM6= :KDRPARAM6,"
                    +"KDRSTYP7= :KDRSTYP7,"
                    +"KDRSADR7= :KDRSADR7,"
                    +"KDRSKONV7= :KDRSKONV7,"
                    +"KDRSPFAD7= :KDRSPFAD7,"
                    +"KDRSSOFORT7= :KDRSSOFORT7,"
                    +"KDRPARAM7= :KDRPARAM7,"
                    +"KDRSTYP8= :KDRSTYP8,"
                    +"KDRSADR8= :KDRSADR8,"
                    +"KDRSKONV8= :KDRSKONV8,"
                    +"KDRSPFAD8= :KDRSPFAD8,"
                    +"KDRSSOFORT8= :KDRSSOFORT8,"
                    +"KDRPARAM8= :KDRPARAM8,"
                    +"KDRFSETIZL= :KDRFSETIZL,"
                    +"KDRLSTYP= :KDRLSTYP,"
                    +"KDRANRNEU= :KDRANRNEU,"
                    +"KDRFMABR= :KDRFMABR,"
                    +"KDRMINAUFTR= :KDRMINAUFTR,"
                    +"KDRMINFM= :KDRMINFM,"
                    +"KDRAUFBER= :KDRAUFBER,"
                    +"KDRSORT= :KDRSORT,"
                    +"KDROSW= :KDROSW,"
                    +"KDRZR= :KDRZR,"
                    +"KDRLFMABR= :KDRLFMABR,"
                    +"KDRZEUGNIS= :KDRZEUGNIS,"
                    +"KDRFILLER= :KDRFILLER,"
                    +"KDRAENZL= :KDRAENZL,"
                    +"KDRAENB= :KDRAENB,"
                    +"KDRAEND= :KDRAEND,"
                    +"KDRNEUB= :KDRNEUB,"
                    +"KDRNEUD= :KDRNEUD,"
                        + " WHERE  "
                        + "  VAKBMANDANT=:VAKBMANDANT AND VAKBKOLL=:VAKBKOLL AND VAKBART =:VAKBART AND VAKBFARBE=:VAKBFARBE AND VAKBKUNDNR=:VAKBKUNDNR";
                    #endregion

                    #region====Parameters====
          or1.Parameters.Add("KDRMANDANT", OracleType.NVarChar).Value = dwData["KDRMANDANT"].ToString(); 
          or1.Parameters.Add("KDRKUNDNR", OracleType.NVarChar).Value = dwData["KDRKUNDNR"].ToString(); 
          or1.Parameters.Add("KDRADRSL", OracleType.NVarChar).Value = dwData["KDRADRSL"].ToString(); 
          or1.Parameters.Add("KDRBESTA", OracleType.NVarChar).Value = dwData["KDRBESTA"].ToString(); 
          or1.Parameters.Add("KDRBESL", OracleType.NVarChar).Value = dwData["KDRBESL"].ToString(); 
          or1.Parameters.Add("KDRLFSTA", OracleType.NVarChar).Value = dwData["KDRLFSTA"].ToString(); 
          or1.Parameters.Add("KDRLFSL", OracleType.NVarChar).Value = dwData["KDRLFSL"].ToString(); 
          or1.Parameters.Add("KDRLFWE", OracleType.NVarChar).Value = dwData["KDRLFWE"].ToString(); 
          or1.Parameters.Add("KDRRESTA", OracleType.NVarChar).Value = dwData["KDRRESTA"].ToString(); 
          or1.Parameters.Add("KDRRESL", OracleType.NVarChar).Value = dwData["KDRRESL"].ToString(); 
          or1.Parameters.Add("KDRLIEFS", OracleType.NVarChar).Value = dwData["KDRLIEFS"].ToString(); 
          or1.Parameters.Add("KDRSTYP1", OracleType.NVarChar).Value = dwData["KDRSTYP1"].ToString(); 
          or1.Parameters.Add("KDRSADR1", OracleType.NVarChar).Value = dwData["KDRSADR1"].ToString(); 
          or1.Parameters.Add("KDRSKONV1", OracleType.NVarChar).Value = dwData["KDRSKONV1"].ToString(); 
          or1.Parameters.Add("KDRSPFAD1", OracleType.NVarChar).Value = dwData["KDRSPFAD1"].ToString(); 
          or1.Parameters.Add("KDRSSOFORT1", OracleType.NVarChar).Value = dwData["KDRSSOFORT1"].ToString(); 
          or1.Parameters.Add("KDRPARAM1", OracleType.NVarChar).Value = dwData["KDRPARAM1"].ToString(); 
          or1.Parameters.Add("KDRSTYP2", OracleType.NVarChar).Value = dwData["KDRSTYP2"].ToString(); 
          or1.Parameters.Add("KDRSADR2", OracleType.NVarChar).Value = dwData["KDRSADR2"].ToString(); 
          or1.Parameters.Add("KDRSKONV2", OracleType.NVarChar).Value = dwData["KDRSKONV2"].ToString(); 
          or1.Parameters.Add("KDRSPFAD2", OracleType.NVarChar).Value = dwData["KDRSPFAD2"].ToString(); 
          or1.Parameters.Add("KDRSSOFORT2", OracleType.NVarChar).Value = dwData["KDRSSOFORT2"].ToString(); 
          or1.Parameters.Add("KDRPARAM2", OracleType.NVarChar).Value = dwData["KDRPARAM2"].ToString(); 
          or1.Parameters.Add("KDRSTYP3", OracleType.NVarChar).Value = dwData["KDRSTYP3"].ToString(); 
          or1.Parameters.Add("KDRSADR3", OracleType.NVarChar).Value = dwData["KDRSADR3"].ToString(); 
          or1.Parameters.Add("KDRSKONV3", OracleType.NVarChar).Value = dwData["KDRSKONV3"].ToString(); 
          or1.Parameters.Add("KDRSPFAD3", OracleType.NVarChar).Value = dwData["KDRSPFAD3"].ToString(); 
          or1.Parameters.Add("KDRSSOFORT3", OracleType.NVarChar).Value = dwData["KDRSSOFORT3"].ToString(); 
          or1.Parameters.Add("KDRPARAM3", OracleType.NVarChar).Value = dwData["KDRPARAM3"].ToString(); 
          or1.Parameters.Add("KDRSTYP4", OracleType.NVarChar).Value = dwData["KDRSTYP4"].ToString(); 
          or1.Parameters.Add("KDRSADR4", OracleType.NVarChar).Value = dwData["KDRSADR4"].ToString(); 
          or1.Parameters.Add("KDRSKONV4", OracleType.NVarChar).Value = dwData["KDRSKONV4"].ToString(); 
          or1.Parameters.Add("KDRSPFAD4", OracleType.NVarChar).Value = dwData["KDRSPFAD4"].ToString(); 
          or1.Parameters.Add("KDRSSOFORT4", OracleType.NVarChar).Value = dwData["KDRSSOFORT4"].ToString(); 
          or1.Parameters.Add("KDRPARAM4", OracleType.NVarChar).Value = dwData["KDRPARAM4"].ToString(); 
          or1.Parameters.Add("KDRSTYP5", OracleType.NVarChar).Value = dwData["KDRSTYP5"].ToString(); 
          or1.Parameters.Add("KDRSADR5", OracleType.NVarChar).Value = dwData["KDRSADR5"].ToString(); 
          or1.Parameters.Add("KDRSKONV5", OracleType.NVarChar).Value = dwData["KDRSKONV5"].ToString(); 
          or1.Parameters.Add("KDRSPFAD5", OracleType.NVarChar).Value = dwData["KDRSPFAD5"].ToString(); 
          or1.Parameters.Add("KDRSSOFORT5", OracleType.NVarChar).Value = dwData["KDRSSOFORT5"].ToString(); 
          or1.Parameters.Add("KDRPARAM5", OracleType.NVarChar).Value = dwData["KDRPARAM5"].ToString(); 
          or1.Parameters.Add("KDRSTYP6", OracleType.NVarChar).Value = dwData["KDRSTYP6"].ToString(); 
          or1.Parameters.Add("KDRSADR6", OracleType.NVarChar).Value = dwData["KDRSADR6"].ToString(); 
          or1.Parameters.Add("KDRSKONV6", OracleType.NVarChar).Value = dwData["KDRSKONV6"].ToString(); 
          or1.Parameters.Add("KDRSPFAD6", OracleType.NVarChar).Value = dwData["KDRSPFAD6"].ToString(); 
          or1.Parameters.Add("KDRSSOFORT6", OracleType.NVarChar).Value = dwData["KDRSSOFORT6"].ToString(); 
          or1.Parameters.Add("KDRPARAM6", OracleType.NVarChar).Value = dwData["KDRPARAM6"].ToString(); 
          or1.Parameters.Add("KDRSTYP7", OracleType.NVarChar).Value = dwData["KDRSTYP7"].ToString(); 
          or1.Parameters.Add("KDRSADR7", OracleType.NVarChar).Value = dwData["KDRSADR7"].ToString(); 
          or1.Parameters.Add("KDRSKONV7", OracleType.NVarChar).Value = dwData["KDRSKONV7"].ToString(); 
          or1.Parameters.Add("KDRSPFAD7", OracleType.NVarChar).Value = dwData["KDRSPFAD7"].ToString(); 
          or1.Parameters.Add("KDRSSOFORT7", OracleType.NVarChar).Value = dwData["KDRSSOFORT7"].ToString(); 
          or1.Parameters.Add("KDRPARAM7", OracleType.NVarChar).Value = dwData["KDRPARAM7"].ToString(); 
          or1.Parameters.Add("KDRSTYP8", OracleType.NVarChar).Value = dwData["KDRSTYP8"].ToString(); 
          or1.Parameters.Add("KDRSADR8", OracleType.NVarChar).Value = dwData["KDRSADR8"].ToString(); 
          or1.Parameters.Add("KDRSKONV8", OracleType.NVarChar).Value = dwData["KDRSKONV8"].ToString(); 
          or1.Parameters.Add("KDRSPFAD8", OracleType.NVarChar).Value = dwData["KDRSPFAD8"].ToString(); 
          or1.Parameters.Add("KDRSSOFORT8", OracleType.NVarChar).Value = dwData["KDRSSOFORT8"].ToString(); 
          or1.Parameters.Add("KDRPARAM8", OracleType.NVarChar).Value = dwData["KDRPARAM8"].ToString(); 
          or1.Parameters.Add("KDRFSETIZL", OracleType.NVarChar).Value = dwData["KDRFSETIZL"].ToString(); 
          or1.Parameters.Add("KDRLSTYP", OracleType.NVarChar).Value = dwData["KDRLSTYP"].ToString(); 
          or1.Parameters.Add("KDRANRNEU", OracleType.NVarChar).Value = dwData["KDRANRNEU"].ToString(); 
          or1.Parameters.Add("KDRFMABR", OracleType.NVarChar).Value = dwData["KDRFMABR"].ToString(); 
          or1.Parameters.Add("KDRMINAUFTR", OracleType.NVarChar).Value = dwData["KDRMINAUFTR"].ToString(); 
          or1.Parameters.Add("KDRMINFM", OracleType.NVarChar).Value = dwData["KDRMINFM"].ToString(); 
          or1.Parameters.Add("KDRAUFBER", OracleType.NVarChar).Value = dwData["KDRAUFBER"].ToString(); 
          or1.Parameters.Add("KDRSORT", OracleType.NVarChar).Value = dwData["KDRSORT"].ToString(); 
          or1.Parameters.Add("KDROSW", OracleType.NVarChar).Value = dwData["KDROSW"].ToString(); 
          or1.Parameters.Add("KDRZR", OracleType.NVarChar).Value = dwData["KDRZR"].ToString(); 
          or1.Parameters.Add("KDRLFMABR", OracleType.NVarChar).Value = dwData["KDRLFMABR"].ToString(); 
          or1.Parameters.Add("KDRZEUGNIS", OracleType.NVarChar).Value = dwData["KDRZEUGNIS"].ToString(); 
          or1.Parameters.Add("KDRFILLER", OracleType.NVarChar).Value = dwData["KDRFILLER"].ToString(); 
          or1.Parameters.Add("KDRAENZL", OracleType.NVarChar).Value = dwData["KDRAENZL"].ToString(); 
          or1.Parameters.Add("KDRAENB", OracleType.NVarChar).Value = dwData["KDRAENB"].ToString(); 
          or1.Parameters.Add("KDRAEND", OracleType.NVarChar).Value = dwData["KDRAEND"].ToString(); 
          or1.Parameters.Add("KDRNEUB", OracleType.NVarChar).Value = dwData["KDRNEUB"].ToString(); 
          or1.Parameters.Add("KDRNEUD", OracleType.NVarChar).Value = dwData["KDRNEUD"].ToString(); 
                    #endregion
                    break; 
                default:
                    break;
            }


            Connect2Proxy(or1);
        }
    }
}
